package com.yeban.javase.day07;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/15
 *
 * 在控制台输出1-10000，计算这段代码执行了多少毫秒 ？
 */
public class Test01 {

    public static void main(String[] args) {

        long before = System.currentTimeMillis();

        for (int i = 1; i < 10001; i++) {
            System.out.println(i);
        }

        long after = System.currentTimeMillis();
        System.out.println();
        System.out.println("1-10000输出需要：" + String.valueOf(after - before) + "毫秒！");
    }
}
